﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.ServiceModel;
using System.ServiceModel.Description;
using System.Runtime.Serialization;

namespace Future.Channel
{
    [DataContract(Namespace = "http://azku.net")]
    [KnownType(typeof(Contract.TaskCommandEnums))]
    [KnownType(typeof(Contract.TaskDALEnums))]
    [KnownType(typeof(Contract.WcfDataType))]
    [Serializable]
    public class Task
    {
        Guid _TaskID;
        Contract.WcfDataType _WcfDataType = Contract.WcfDataType.Buffer;

        public Task()
        {
            TaskID = new Guid();
        }

        #region ITask 成员

        [DataMember]
        public Guid TaskID
        {
            get { return _TaskID; }
            set { _TaskID = value; }
        }

        [DataMember]
        public Contract.WcfDataType WcfDataType
        {
            get { return _WcfDataType; }
            set { _WcfDataType = value; }
        }

        [DataMember]
        public Contract.TaskDALEnums DALName
        {
            get;
            set;
        }

        [DataMember]
        public Contract.TaskCommandEnums CommandName
        {
            get;
            set;
        }

        [DataMember]
        public string JsonArgument
        {
            get;
            set;
        }

        [DataMember]
        public byte[] BufferArgument
        {
            get;
            set;
        }

        [DataMember]
        public string JsonResult
        {
            get;
            set;
        }

        [DataMember]
        public byte[] BufferResult
        {
            get;
            set;
        }

        #endregion
    }
}
